<?php #coding: utf-8 æ ø å ?>
<?	
//viser sidste levels stats
$data['stat_temp_vis'] = $this->karakterark_model->stats($stamdata['id'], "temp", $level-1);
$data['stat_pot_vis'] = $this->karakterark_model->stats($stamdata['id'], "pot", $level-1);
$data['level'] = $level-1;
$data['vis_samtlige'] = "nej";
echo "<p class='rubrik'><b>Stats level ".$data['level']."</b></p>";
$this->load->view('karakterark/stats/vis_stats',$data);

//viser gain form
$stat_names = array("Lu","Co","Ag","Re","Me","SD","St","Qu","Pr","Em","In");
	?>
	<form style="float:right" action="<? echo base_url() ?>karakterark/stat_gain/<? echo $id; ?>/<? echo $level; ?>" method="post">
		<input type="hidden" name="aktion" value="stat_gain">
		<input type="hidden" name="level" value="<?echo $level;?>">
<table class="rubrik" style="margin:8px 0px 0px 0px;text-align:center">
			<tr>
            <td></td>
			<td width="10px"><p class="rubrik"><b>temp<br>gain</b></p></td>
			<td width="10px" ><p class="rubrik"><b>pot<br>gain</b></p></td>
			</tr>
			<?
			foreach($stat_names as $r)
			{
			?>	
				<tr>
				<td><? echo $r; ?></td>
				<td><input type="text" style="width:30px;height:9px;font-weight:bold;" class="ink" name="temp_<? echo $r; ?>" value=""/></td>
				<td><? if($stat_pot_vis[$r] == $stat_temp_vis[$r])
				{
					?><input type="text" style="width:30px;height:9px;font-weight:bold;" class="ink" name="pot_<? echo $r; ?>" value=""/><?
				} ?></td>
				</tr>
			<?
			}
			?>
		</table><br>
		<input style="float:right;" class="rubrik" type=submit value="<? echo 'Gain'; ?>"/>
	</form>
	<?


